#include "style_init.h"

lv_style_t style_win3;
lv_style_t style_win4;

void style_init(void)
{
    lv_font_t *font_win3 = lv_freetype_font_create("/root/simkai.ttf", // 字体文件路径
                                                   LV_FREETYPE_FONT_RENDER_MODE_BITMAP,
                                                   24,
                                                   LV_FREETYPE_FONT_STYLE_NORMAL);

    if (!font_win3)
    {
        printf("freetype font create failed.\n");
        return;
    }

    lv_style_init(&style_win3);
    lv_style_set_text_font(&style_win3, font_win3);
    lv_style_set_text_align(&style_win3, LV_TEXT_ALIGN_CENTER);

    lv_font_t *font_win4 = lv_freetype_font_create("/root/simkai.ttf", // 字体文件路径
                                              LV_FREETYPE_FONT_RENDER_MODE_BITMAP,
                                              40,
                                              LV_FREETYPE_FONT_STYLE_NORMAL);

    if (!font_win4)
    {
        LV_LOG_ERROR("freetype font create failed.");
        return;
    }
    /*Create style with the new font*/
    lv_style_init(&style_win4);
    lv_style_set_text_font(&style_win4, font_win4);
    lv_style_set_text_align(&style_win4, LV_TEXT_ALIGN_CENTER);
}
